package com.ttsx.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ttsx.core.mybatis.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.List;

/**
 * 产品表
 * @author lucky
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Product extends BaseEntity {

    /**
     * 分类ID
     */
    private Long categoryId;

    /**
     * 产品名称
     */
    private String name;

    private String imageUrl;

    private String unit;
    /**
     * 产品描述
     */
    private String description;

    /**
     * 产品价格
     */
    private BigDecimal price;

    /**
     * 产品库存
     */
    private Integer stock;

    /**
     * 人气
     */
    private Integer popularity;


    @TableField(exist = false)
    private List<ProductDetail> details;
}